package com.jason.kotlin.meta.architecture1.api

import com.jason.kotlin.meta.architecture1.model.MetaImageBean
import com.jason.kotlin.meta.architecture1.model.MetaResponseBean
import retrofit2.Call
import retrofit2.http.*

interface MetaApiService {

    //https://image.so.com/j?q=%E5%8C%97%E4%BA%AC&sn=0&pn=10

    @GET("/j")
    fun loadMetaImages(@QueryMap map: Map<String, String>): Call<MetaResponseBean<List<MetaImageBean>>>


    @GET("/j")
    suspend fun loadMetaImages(
        @Query("q") keyword: String,
        @Query("sn") page: Int,
        @Query("pn") count: Int
    ): MetaResponseBean<List<MetaImageBean>>
}